
local key = "chat_group:group_message:groupID_" .. ARGV[1]
local timestamp = tonumber(ARGV[3])
redis.call('ZADD',key,timestamp,ARGV[2])

for i = 1, #KEYS do
    local newKey = "chat_group:user_group_object:ID_" .. KEYS[i] .. ":"  .. ARGV[1]
    local newKey2 = "chat_group:user_group_list:ID_" .. KEYS[i]
    redis.call('ZADD', newKey2, timestamp, ARGV[1])
    redis.call('HSET', newKey, 'content', ARGV[4])
    redis.call('HSET', newKey, 'time', ARGV[5])
    redis.call('HINCRBY',newKey,'tip',1)
end
